<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <title>新增工作任务</title>
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui-pull-refresh.css" />
    <link rel="stylesheet" type="text/css" href="../css/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="css/form.css" />
    <link rel="stylesheet" type="text/css" href="css/comm.css" />
    <link rel="stylesheet" type="text/css" href="css/plantasklist.css" />
    <link rel="stylesheet" type="text/css" href="css/plandevicetaskdetail.css" />
    <link rel="stylesheet" type="text/css" href="css/qualitycontrol.css" />
    <link rel="stylesheet" type="text/css" href="css/form.css" />
    <link rel="stylesheet" type="text/css" href="css/editStyle.css" />
    <link rel="stylesheet" type="text/css" href="../script/mui/mui.picker.min.css" />
    <link rel="stylesheet" type="text/css" href="../script/mui/mui.reset.css" />
    <link rel="stylesheet" type="text/css" href="css/worktaskadd.css" />
    <style>
     
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <div class="mask_bg" v-on:click="doCloseTaskType()" v-if="IsTaskTypeOpen"></div>
        <div class="mask_bg" v-on:click="doCloseTaskTag()" v-if="IsTaskTagOpen"></div>
        <div class="choose_box" v-if="IsTaskTypeOpen">
            <div class="choose_room_title">
                <div class="choose_room_title">选择任务类型</div>
            </div>
            <div class="choose_room_content">
                <div v-on:click="doSelectTaskType(item)"  class="choose_room_item"  v-for="item in TaskTypeList" v-bind:class="{'selected':newform.TaskType==item.ID}" >
                    <label>{{item.Name}}</label><i  v-bind:class="{'selected':newform.TaskType==item.ID}" class="icon iconfont icon-xuanze"></i>
                </div>
            </div>
        </div>
        <div class="choose_box" v-if="IsTaskTagOpen">
            <div class="choose_room_title">
                <div class="choose_room_title">选择任务标签</div>
            </div>
            <div >
                <div class="choose_tasktag">
                    <label v-on:click="doSelectTaskTag(item)"
                    v-bind:class="{'active':item.IsSelected}"
                    v-for="item in TaskTagList">{{item.Name}}</label>
                </div>
                <div class="aui-padded-l-15 aui-padded-r-15" style="text-align: center;">
                    <div v-on:click="doCloseTaskTag()" class="aui-btn choose_tasktag_btn aui-margin-r-10" style="color: #289fff;background: #fff;">取消</div>
                    <div v-on:click="doSelectTaskTagOk()" class="aui-btn aui-btn-primary choose_tasktag_btn">确定</div>
                </div>
            </div>
        </div>
        <div class="boxarea edit " style="overflow: hidden;">
            <div class="">
                <div class="aui_formitem">
                    <div class="aui_formtitle">任务类型<img class="col-star" src="../image/redstar.png"></div>
                    <div v-on:click="doTaskTypeOpen()" class="aui_formcontent">
                        <input class="choose" v-model="newform.TaskTypeName" readonly="readonly" type="text" placeholder="请选择">
                        <i class="icon iconfont icon-xiangyoujiantou"></i>
                    </div>
                </div>
                <div class="aui_formitem" style="display: block;">
                    <div class="formitem_line">
                        <div  class="aui_formtitle ">负责人<img class="col-star" src="../image/redstar.png"></div>
                        <div v-on:click="doChooseHandleUser()" class="aui_formcontent">
                            <input class="choose" v-model="newform.TaskChargeUserName" readonly="readonly" type="text" placeholder="请选择">
                            <i class="icon iconfont icon-xiangyoujiantou"></i>
                        </div>
                    </div>
                </div>
                <div class="aui_formitem border-bottom0">
                    <div class="aui_formitem block border-bottom0 new-formcontent ">
                        <div class="aui_formtitle">任务周期<img class="col-star" src="../image/redstar.png"></div>
                        <div class="aui_formcontent" style="padding-left: 0px;">
                            <span class="choose " style="width: 45%;" id="choosedatestarttime" data-options='{"type":"datetime"}' v-bind:class="{'textColorPlaceholder':newform.TaskStartTime==''}">{{newform.TaskStartTime==''?'任务开始时间':newform.TaskStartTime}}</span>
                            至
                            <span class="choose " style="width: 45%;text-align: right;" id="choosedateendtime" data-options='{"type":"datetime"}' v-bind:class="{'textColorPlaceholder':newform.TaskEndTime==''}">{{newform.TaskEndTime==''?'任务结束时间':newform.TaskEndTime}}</span>
                        </div>
                    </div>
                </div>
                <div class="aui_formitem">
                    <div class="aui_formitem block border-bottom0 new-formcontent ">
                        <div class="aui_formtitle">任务标题<img class="col-star" src="../image/redstar.png"></div>
                        <div class="aui_formcontent" style="padding-left: 0px;">
                            <textarea placeholder="请填写任务标题信息" v-model="newform.Title" style="height: 1.2rem;"></textarea>
                        </div>
                    </div>
                </div>
                <div class="aui_formitem border-bottom0">
                    <div class="aui_formitem block border-bottom0 new-formcontent ">
                        <div class="aui_formtitle">任务详情<img class="col-star" src="../image/redstar.png"></div>
                        <div class="aui_formcontent" style="padding-left: 0px;">
                            <textarea placeholder="请尽量填写详细的任务内容" v-model="newform.TaskContent" style="height: 4rem;"></textarea>
                        </div>
                    </div>
                </div>
                <div class="imglist_box" style="padding-top: 30px;">
                    <div v-if="task_imgList.length>0" class="imglist_item" v-for="(item,index) in task_imgList">
                        <img v-on:click="do_viewimages_edit(index)" class="imgitem ml4" v-bind:src="item.SysFinalFilePath" />
                        <img v-on:click="remove_img_edit(item.ID)" class="onmouse_close" src="../image/close_mouseover.svg" />
                    </div>
                    <div class="imglist_item" v-for="(item,index) in imglist">
                        <img v-on:click="do_viewimages(index)" class="imgitem ml4" v-bind:src="item.url" />
                        <img v-on:click="remove_img(index,item)" class="onmouse_close" src="../image/close_mouseover.svg" />
                    </div>
                    
                    <div v-if="imglist.length<maxuploadcount" class="imglist_item ml4">
                        <div class="img_plusbox">
                            <img v-on:click="choose_picture()" src="../image/photo_image.svg" />
                        </div>
                        最多支持{{maxuploadcount}}张
                    </div>
                </div>

            </div>
        </div>

        <div  class="aui_list boxarea mb20">
            <div class="work_title">
                协同管理人<span v-if="newform.TaskWorkUser.length>0">({{newform.TaskWorkUser.length}}人)</span>
                <i  v-on:click="doChooseWorktakeUser()" class="icon iconfont icon-addApp text-blue fr"></i>
            </div>
            <div class="shenpi">
                <div  class="fl aui-margin-r-10" v-for="(item,index) in newform.TaskWorkUser">
                    <div class="shenpi_person">
                        <div class="person">
                            <span v-if="item.HeadImg==''||!item.HeadImg">{{item.FinalRealName.slice(-2)}}</span>
                            <img v-else :src="item.HeadImg" style="width: 100%;height: 100%;">
                        </div>
                        <div class="person_name text-gray ellipsis-1">{{item.FinalRealName}}</div>
                        <img v-on:click="doRemoveWorkUser(item,index)" class="person_close" src="../image/cx.png">
                     </div>
                </div>
            </div>
        </div>
        <div  class="aui_list boxarea mb20">
            <div class="work_title">
                任务参与人<span v-if="newform.TaskMoreUser.length>0">({{newform.TaskMoreUser.length}}人)</span>
                <i  v-on:click="doChoosePartakeUser()" class="icon iconfont icon-addApp text-blue fr"></i>
            </div>
            <div class="shenpi">
                <div  class="fl aui-margin-r-10" v-for="(item,index) in newform.TaskMoreUser">
                    <div class="shenpi_person">
                        <div class="person">
                            <span v-if="item.HeadImg==''||!item.HeadImg">{{item.FinalRealName.slice(-2)}}</span>
                            <img v-else :src="item.HeadImg" style="width: 100%;height: 100%;">
                        </div>
                        <div class="person_name text-gray ellipsis-1">{{item.FinalRealName}}</div>
                        <img v-on:click="doRemoveUser(item,index)" class="person_close" src="../image/cx.png">
                     </div>
                </div>
            </div>
        </div>
        <div  class="aui_list boxarea mb20" >
            <div class="work_title">
                任务标签
                <i  v-on:click="doTaskTagOpen()" class="icon iconfont icon-addApp text-blue fr"></i>
            </div>
            <div class="shenpi">
                <div  class="fl aui-margin-r-10" v-for="(item,index) in newform.TaskTag">
                    <div class="shenpi_person" style="width: auto;">
                        <div class="person-tag">
                            <span>{{item.Name}}</span>
                        </div>
                        <img v-on:click="doRemoveTaskTag(item,index)" class="person_close" src="../image/cx.png">
                     </div>
                </div>
            </div>
        </div>
        <div style="height: 5rem;"></div>
        <div class="aui_bottom" style="display: flex;justify-content: space-between;">
            <div class="aui_bottombtn new_bottombtn" v-if="newform.TaskStatus==1" v-on:click="do_save(1)" style="background: #fff;color: #289FFF;">暂存</div>
            <div class="aui_bottombtn new_bottombtn" v-if="newform.TaskStatus!=1" v-on:click="do_close()" style="background: #fff;color: #289FFF;">返回</div>
            <div class="aui_bottombtn new_bottombtn" v-on:click="do_save(2)"> 保存并发布</div>
        </div>
    </div>
</body>
<script type="text/javascript " src="../script/api.js "></script>
<script type="text/javascript " src="../script/vue.js "></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/mui/mui.min.js"></script>
<script type="text/javascript" src="../script/mui/mui.picker.min.js"></script>
<script type="text/javascript" src="../script/mui/mui.poppicker.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/aui-tab.js"></script>
<script type="text/javascript" src="../script/aui-pull-refresh.js"></script>
<script type="text/javascript" src="../script/aui-scroll.js"></script>
<script type="text/javascript" src="../script/aui-popup.js"></script>
<script type="text/javascript " src="../script/moment/moment.js"></script>
<script type="text/javascript " src="js/worktaskadd.js"></script>

</html>
